<?php 
class Mdproject extends Table{    
	public function __construct(){
		parent::__construct("project");
	}
	public function listProject(){
        return $this->get();
	}
    
    public function addProject($data) {
        return $this->insert($data);                           
    }
    
    public function getProject($id) {
        return $this->read($id);
    }
    
    public function updateProject($data,$id){
        return $this->update($data, array("project_id" => $id));
    }
    
    public function deleteProject($id) {
        return $this->delete($id);
    }
    
    public function finishedProject($finished)
    {
        //$this->db->select("project_id,user_id");
        $this->db->where('finished',$finished);
        $query=$this->db->get("project");
        return $query->result_array();
    }
    
   
    
}

?>